<?php 
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header2', 'admin');
?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8"/>
<title>Metronic | Form Stuff - Form Layouts</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta content="" name="description"/>
<meta content="" name="author"/>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<!--
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
-->
<link href="<?php echo CSS_PATH?>metronic/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link rel="stylesheet" type="text/css" href="<?php echo CSS_PATH?>metronic/select2/select2.css"/>
<!-- END PAGE LEVEL SCRIPTS -->
<!-- BEGIN THEME STYLES -->
<link href="<?php echo CSS_PATH?>metronic/components.css" id="style_components" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/plugins.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/layout.css" rel="stylesheet" type="text/css"/>
<link id="style_color" href="<?php echo CSS_PATH?>metronic/darkblue.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/custom.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>select_xiala.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>table_form.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="<?php echo JS_PATH?>calendar/jscal2.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo JS_PATH?>calendar/border-radius.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo JS_PATH?>calendar/win2k.css"/>
<script type="text/javascript" src="<?php echo JS_PATH?>calendar/calendar.js"></script>
<script type="text/javascript" src="<?php echo JS_PATH?>calendar/lang/en.js"></script>
<script src="<?php echo JS_PATH?>PCASClass.js"></script>
<!-- END THEME STYLES -->
<link rel="shortcut icon" href="favicon.ico"/>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed page-quick-sidebar-over-content ">
<!-- BEGIN HEADER -->
<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div>
			<!-- BEGIN PAGE CONTENT-->
			<div class="row">
				<div class="col-xs-2">
					<div class="tabbable-line boxless tabbable-reversed">
						<div class="tab-content">						
									<div style="background-color: #5a99fb;padding: 9px;color: white;">
										<h1 class="text-center"><?php echo $patients_data['patient_name']?></h1><br>
										<p class="text-center">
											<?php echo $patients_data['sex']?>
											<?php echo $patients_data['age']?>
											<?php echo $patients_data['address']?>
										</p>
										<p class="text-center">
											<h>电话：<?php echo $patients_data['phone']?></h>
											
										</p>
										<p class="text-center">
											<h>档案号：<?php echo $patients_data['archives_num']?></h>
										</p>		
									</div>
								<?php if(is_array($medical_record_data)){foreach($medical_record_data as $v){?>  
								<p class='text-center' style="background-color: #e2e8f7;padding: 13px;margin-top: 4px;border-radius: 6px !important;">
									<a style="color:black" href="javascript:editRecord('<?php echo $v['id']?>')"><?php echo $v['clinic_time']?></a>
								</p>
								<?php }} ?>
						
							
						</div>
					</div>
				
				</div>
				<div class="col-xs-10">
					<div class="tabbable-line boxless tabbable-reversed">
						<div class="tab-content">
						
							<div class="tab-pane active" id="tab_0">	
									<div class="portlet-body form">
										<!-- <h><strong>编辑病人信息：</strong></h> -->
										<!-- BEGIN FORM-->
										<form name="myform" action="?m=admin&c=boneDatabase&a=patients_editdo" method="post" id="myform" class="form-horizontal">
												<h><strong>查看病人信息：</strong></h>
											<div class="form-body">
												<div class="col-xs-5">
														
													
														<div class="form-group">
														<label class="col-xs-12 pullleft">档案号</label>
														<div class="col-xs-12">
															<input type="text" name="archives_num" id="archives_num" disabled="" class="form-control input-circle" value="<?php echo $patients_data['archives_num']?>">
														</div>
													  </div>
													  <div class="form-group">
														<label class="col-xs-12 pullleft">姓名</label>
														<div class="col-xs-12">
															<input type="text" name="patient_name" id="patient_name"  class="form-control input-circle" value="<?php echo $patients_data['patient_name']?>" disabled="">
														</div>
													   </div>
													   <div class="form-group">
														<label class="col-xs-12 pullleft">性别</label>
															<div class="col-xs-12">
																	<select name='sex' class="selectadd" disabled="">
																		<option value="男" <?php if($patients_data['sex']=='男'){ echo 'selected';}?>>男</option>
																		<option value="女" <?php if($patients_data['sex']=='女'){ echo 'selected';}?>>女</option>
																	</select>
																
															</div>
													    </div>
														<div class="form-group">
															<label class="col-xs-12 pullleft">出生日期</label>
															<div class="col-xs-12">
																<input type="text"  class="selectadd date" value="<?php echo $patients_data['birthday']?>" name="birthday" id="birthday" size="10" class="date" disabled="">
																	<script type="text/javascript">
																		Calendar.setup({
																		weekNumbers: true,
																		inputField : "birthday",
																		trigger    : "birthday",
																		dateFormat: "%Y-%m-%d",
																		showTime: false,
																		minuteStep: 1,
																		onSelect   : function() {this.hide();}
																		});
																	</script>
														    </div>
														</div>
													<div class="form-group">
														<label class="col-xs-12 pullleft">年龄</label>
														<div class="col-xs-12">
															<input type="text" name="age"  class="form-control input-circle" value="<?php echo $patients_data['age']?>" disabled="">
															
														</div>
													</div>
													<div class="form-group">
														<label class="col-xs-12 pullleft">联系电话</label>
														<div class="col-xs-12">
															<input type="text" name="phone" id="phone"  class="form-control input-circle" value="<?php echo $patients_data['phone']?>" disabled=''>
														</div>
													</div>
												</div>
												<div class="col-xs-5">
														
													<div class="form-group">
														<label class="col-xs-12 pullleft">婚姻</label>
														<div class="col-xs-12">
															<select name='sex' class="selectadd" disabled="">
																	<option value="男" <?php if($patients_data['marriage']=='已婚'){ echo 'selected';}?> disabled="">已婚</option>
																	<option value="女" <?php if($patients_data['marriage']=='未婚'){ echo 'selected';}?> disabled="">未婚</option>
															</select>
															
														</div>
													</div>
													<div class="form-group">
														<label class="col-xs-12 pullleft" >民族</label>
														<div class="col-xs-12">
														<input type="text"  class="form-control input-circle" value="<?php echo $patients_data['nation']?>" disabled=''>
														 </div>
														
													</div>
													<div class="form-group">
														<label class="col-xs-12 pullleft">出生地</label>
														 	<select name="province" value="" class="selectadd" style="margin-left: 13px;width: 26%;"></select>
														 	<select name="city" value="" class="selectadd" style="margin-left: 13px;width: 26%;"></select>
														 	<select name="county" value="" class="selectadd" style="margin-left: 13px;width: 26%;"></select><br>
															<script language="javascript" defer>
															
															var pro="<?php echo $patients_data['province']?>";
															var city="<?php echo $patients_data['city']?>";
															var county="<?php echo $patients_data['county']?>";
															
													
															new PCAS("province","city","county",pro.trim(),city.trim(),county.trim());
															</script>
													</div>
													<div class="form-group">
														<label class="col-xs-12 pullleft">住址</label>
														<div class="col-xs-12">
															<input type="text" name="address" id="address"  class="form-control input-circle" value='<?php echo $patients_data['address']?>' disabled=''>
														</div>
													</div>
													<div class="form-group">
														<label class="col-xs-12 pullleft">职业</label>
														<div class="col-xs-12">
															<input type="text" name="job" id="job"  class="form-control input-circle" value="<?php echo $patients_data['job']?>" disabled=''>
														</div>
													</div>
													
													<div class="form-group">
														<label class="col-xs-12 pullleft">邮箱</label>
														<div class="col-xs-12">
															<input type="text" name="email" id="email"  class="form-control input-circle" value="<?php echo $patients_data['email']?>" disabled=''>
														</div>
													</div>		
												</div>
												
											</div>
											<div class="form-actions">
												<div class="row">
													<input type="hidden" name="id" value="<?php echo $patients_data['id']?>" />
													<div class="col-xs-offset-8 col-xs-12">
														 
														 <a href="/boneDatabase/index.php?m=admin&c=boneDatabase&a=patients_info" class="btn btn-circle blue" style="width: 11%;" onclick="history.go(-1)">返回</a>
													</div>
												</div>
											</div>
										</form>
										<!-- END FORM-->
									</div>
						</div>
					</div>
				</div>
			</div>
			<!-- END PAGE CONTENT-->
		</div>
	</div>
	<!-- END CONTENT -->
</div>
<!-- [if lt IE 9]> -->
<script src="<?php echo CSS_PATH?>metronic/respond.min.js"></script>
<script src="<?php echo CSS_PATH?>metronic/excanvas.min.js"></script>
<script type="text/javascript">

	function editRecord(id){
	location.href ='?m=admin&c=boneDatabase&a=medicalRecord_view&id='+id+'&pc_hash='+pc_hash+'&goback='+BASE64.encode(location.search);
}
</script>
<script type="text/javascript" src="statics/js/base64.js"></script> 
<!-- <![endif] -->
<!-- <script type="text/javascript" src="jquery-1.8.0.min.js"></script> -->
<script type="text/javascript">
    var national = [
            "汉族", "壮族", "满族", "回族", "苗族", "维吾尔族", "土家族", "彝族", "蒙古族", "藏族", "布依族", "侗族", "瑶族", "朝鲜族", "白族", "哈尼族",
            "哈萨克族", "黎族", "傣族", "畲族", "傈僳族", "仡佬族", "东乡族", "高山族", "拉祜族", "水族", "佤族", "纳西族", "羌族", "土族", "仫佬族", "锡伯族",
            "柯尔克孜族", "达斡尔族", "景颇族", "毛南族", "撒拉族", "布朗族", "塔吉克族", "阿昌族", "普米族", "鄂温克族", "怒族", "京族", "基诺族", "德昂族", "保安族",
            "俄罗斯族", "裕固族", "乌孜别克族", "门巴族", "鄂伦春族", "独龙族", "塔塔尔族", "赫哲族", "珞巴族"
    ];
    window.onload = function ()
    {
        var nat = document.getElementById ("national");
        for ( var i = 0; i < national.length; i++)
        {
            var option = document.createElement ('option');

             option.value = national[i];
            var txt = document.createTextNode (national[i]);

            option.appendChild (txt);
            nat.appendChild (option);
        }
    }
</script>

<script src="<?php echo CSS_PATH?>metronic/jquery.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/jquery-migrate.min.js" type="text/javascript"></script>
<!-- IMPORTANT! Load jquery-ui.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
<script src="<?php echo CSS_PATH?>metronic/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/jquery.blockui.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/jquery.cokie.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script type="text/javascript" src="<?php echo CSS_PATH?>metronic/select2/select2.min.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="<?php echo CSS_PATH?>metronic/metronic.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/layout.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/quick-sidebar.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/demo.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/form-samples.js"></script>
<script src="<?php echo JS_PATH?>formvalidator.js"></script>
<script src="<?php echo JS_PATH?>formvalidatorregex.js"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
jQuery(document).ready(function() {    
   // initiate layout and plugins
   Metronic.init(); // init metronic core components
Layout.init(); // init current layout
QuickSidebar.init(); // init quick sidebar
Demo.init(); // init demo features
   FormSamples.init();
});
</script>
<script type="text/javascript">
 //  $(document).ready(function() {
  
	// $.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	


	// $("#name").formValidator({onshow:"<?php echo L('input').L('代理商名称')?>",onfocus:"<?php echo L('请输入').L('代理商名称')?>"}).inputValidator({min:3,max:30,onerror:"<?php echo L('代理商名称').L('3-30字符')?>"}).ajaxValidator({
	//     type : "get",
	// 	url : "",
	// 	data :"m=go3c&c=tvuser&a=check_agent_name_ajx",
	// 	datatype : "html",
	// 	async:'false',
	// 	success : function(data){	
 //            if( data == "1" )
	// 		{
 //                return true;
	// 		}
 //            else
	// 		{
 //                return false;
	// 		}
	// 	},
	// 	buttons: $("#dosubmit"),
	// 	onerror : "<?php echo L('该代理商已存在')?>",
	// 	onwait : "<?php echo L('检查中')?>"

	// })
	

	//  $("#sort").formValidator({ // 验证：模块名称
	//  		onshow: "（必填，数字越大越靠前）",
 //            onfocus: "（必填，正整数，数字越大越靠前）",
 //            oncorrect: "（正确）"
 //        }).inputValidator({
 //            min: 1,
 //            max: 10000000,
 //            type: "value",
 //            onerrormin: "（错误）不能为空",
 //            onerrormax: "（错误）超过范围"
 //        });
 //  })
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>